Skip to content

Conversation

@Joshna907
Copy link

feat(rpc): KafkaProdReceiver thread-safety improvements

  • Added RWMutex for thread-safe map access
  • Locks applied for AddTopicIfNotExists and CloseConnectionForDB only
  • Minor naming correction in connRegistry

@Joshna907 Joshna907 closed this Oct 19, 2025
@Joshna907 Joshna907 reopened this Oct 19, 2025
@0xgouda
Copy link
Contributor

0xgouda commented Oct 31, 2025

Hey Joshna, thanks for your proactiveness and effort, but the code doesn't even compile, and for many reasons!!

kafka_prod_receiver/$ go run .
kafka_prod_receiver.go:9:2: no required module provides package github.com/cybertec-postgresql/pgwatch3/rpc/proto; to add it:
       go get github.com/cybertec-postgresql/pgwatch3/rpc/proto

Yeah, here we should probably change the module name to github.com/cybertec-postgresql/pgwatch instead of github.com/destrex271/pgwatch3_rpc_server, but that's another point
2.

kafka_prod_receiver/$ go run .
# github.com/destrex271/pgwatch3_rpc_server/cmd/kafka_prod_receiver
./kafka_prod_receiver.go:32:8: undefined: pb
./kafka_prod_receiver.go:34:8: undefined: pb
./kafka_prod_receiver.go:110:74: undefined: pb
./kafka_prod_receiver.go:152:10: undefined: pb

you removed the pb package
3.

kafka_prod_receiver/$ go run .
# github.com/destrex271/pgwatch3_rpc_server/cmd/kafka_prod_receiver
./kafka_prod_receiver.go:33:11: undefined: pb.SyncOperation_ADD
./kafka_prod_receiver.go:35:11: undefined: pb.SyncOperation_DELETE

There is no such SyncOperation_ADD the protobuf generated name is as it was SyncOp_DeleteOp, you mustn't change it

You can use "vibe coding" and AI as much as you want, but make sure to review its code and that your proposed functionality actually works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants